package com.lcy.model.entity;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import com.mybatisflex.core.keygen.KeyGenerators;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "AI 代码分析报告")
@Table(value = "ai_code_analysis")
public class AiCodeAnalysis implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;
    @Id(keyType = KeyType.Generator, value = KeyGenerators.snowFlakeId)
    @Schema(description = "分析报告的唯一标识")
    private Long id;

    @Schema(description = "关联的题目提交记录的 ID")
    private Long problemSubmitId;

    @Schema(description = "AI 生成的分析报告内容")
    private String analysisResult;

    @Column(onInsertValue = "now()")
    @Schema(description = "分析报告的创建时间")
    private LocalDateTime createdAt;
}
